package com.capgemini.diabeo.activity;

import android.app.Activity;
import android.view.View;

import com.capgemini.diabeo.R;
import com.capgemini.diabeo.manager.MealStatus;
import com.capgemini.diabeo.manager.DishManager;
import com.googlecode.androidannotations.annotations.Bean;
import com.googlecode.androidannotations.annotations.Click;
import com.googlecode.androidannotations.annotations.EActivity;

@EActivity(R.layout.activity_meal_choice)
public class MealChoiceActivity extends Activity {

	@Bean
	DishManager dishManager;

	@Click
	public void breakfastButtonClicked(View view) {
		handleClick(MealStatus.BREAKFAST_MENU);
	}

	@Click
	public void dinnerButtonClicked(View view) {
		handleClick(MealStatus.DINNER_MENU);
	}

	@Click
	public void lunchTimeButtonClicked(View view) {
		handleClick(MealStatus.LUNCH_TIME_MENU);
	}

	private void handleClick(MealStatus mealEnum) {
		dishManager.setMenuMeal(mealEnum);
		MenuActivity_.intent(this).start();
	}

}
